/** 注释
 * @Name index
 * @Author FiveXu
 * @Description 组件通用接口
 * @Date 2021-06-22 14:48
 */

// 像素单位判定
export const codeRule = new RegExp(/px|rem|em|%|vw|vh$/, 'i')

// 组件大小类型枚举
export type ComponentSize = 'large' | 'middle' | 'default' | 'mini'

// 组件大小类型数组
export const componentSizeArr: ComponentSize[] = ['large', 'middle', 'default', 'mini']

// 组件样式类型枚举
export type ComponentTypes = 'primary' | 'success' | 'warning' | 'error'

// 组件样式类型数组
export const componentTypesArr: Array<ComponentTypes | 'text' | ''> = ['primary', 'success', 'warning', 'error', 'text', '']

// 组件样式类型枚举
export type ComponentTheme = 'light' | 'plain' | 'dark'

// 组件样式类型数组
export const componentThemeArr: Array<ComponentTheme | ''> = ['light', 'plain', 'dark', '']

export type PositionPath =
  'topLeft'
  | 'top'
  | 'topRight'
  | 'rightTop'
  | 'right'
  | 'rightBottom'
  | 'bottomLeft'
  | 'bottom'
  | 'bottomRight'
  | 'leftTop'
  | 'left'
  | 'leftBottom'
